package com.appcenter.application.mapper;

import com.appcenter.application.input.syncdata.GetSyncDatasInput;
import com.appcenter.application.model.SyncDatas;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
@Repository
public interface SyncDatasMapper extends Mapper<SyncDatas>{

    @Select("<script>" +
            "select * from  syncdatas s where s.OperatAppCode=#{OperatAppCode} AND s.DirectionAppCode=#{DirectionAppCode} " +
            ""+
            " <when test='LastTime!=null'>" +
            " AND s.CreateTime>#{LastTime}"+
            " </when>"+
            "</script>")
    List<SyncDatas> getSyncDatas(GetSyncDatasInput input);
}
